home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Gray Matter (PalmOS) / Source / grfpatch.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-24  |  1.8 KB  |  66 lines

  1. /* Gray Matter
  2.  * Written at MacHack 2000 by Allon Stern
  3.  * FREEWARE
  4.  * Feel free to use this code for working your own hacks, or
  5.  * extend the functionality!
  6.  * However, please don't distribute modified versions as "Gray Matter" or
  7.  * under my name.
  8.  * If you have ideas you want me to incorporate into Gray Matter, send me
  9.  * email at allon+palm@radioactive.org
  10.  
  11.  
  12. This file doesn't do anything. Look at the other one.
  13.  
  14.  
  15.  */
  16.  
  17.  
  18. #include <Pilot.h>
  19. #include <ScrDriverNew.h>
  20. #include <SysEvtMgr.h>
  21. #include <SystemPrv.h>
  22. #include <FeatureMgr.h>
  23. #include <SystemMgr.h>
  24. //#include <Graffiti.h>
  25.  
  26. /***********************************************************************
  27.  *
  28.  *   Internal Constants
  29.  *
  30.  ***********************************************************************/
  31. #define kHackFileCreator        'GrMr'
  32. #define kHackCodeID                1000
  33.  
  34. /***********************************************************************
  35.  *
  36.  *   Function Prototypes
  37.  *
  38.  ***********************************************************************/
  39.  
  40. Err        MySysAppStartup(SysAppInfoPtr* appInfoPP, Ptr* prevGlobalsP, 
  41.                             Ptr* globalsPtrP);
  42.  
  43. Err        MySysAppStartup(SysAppInfoPtr* appInfoPP, Ptr* prevGlobalsP, 
  44.                             Ptr* globalsPtrP)
  45. {
  46.     Err (*oldtrap)(SysAppInfoPtr *, Ptr *, Ptr *);
  47.     DWord temp; // for the feature manager call type checking
  48.     Err err;
  49.     Byte data = 0;
  50.     DWord depth = 2;
  51.  
  52.     // Get the address of the old routine from HackMaster:
  53.     err = FtrGet(kHackFileCreator,kHackCodeID,&temp);
  54.     ErrFatalDisplayIf(err, "can't get real trap address");
  55.     oldtrap=(Err (*)(SysAppInfoPtr *, Ptr *, Ptr *))temp;
  56.  
  57. //    if((*appInfoPP)->cmd == sysAppLaunchCmdNormalLaunch)
  58. //        err = ScrDisplayMode(scrDisplayModeSet, NULL, NULL, &depth, false);
  59. //        err = FtrSet(sysFtrCreator, sysFtrNumDisplayDepth, 2);
  60.  
  61.  
  62.     return oldtrap (appInfoPP, prevGlobalsP, globalsPtrP);
  63. }
  64.  
  65.  
  66.